#ifndef _GLOBALMESSAGE_H_
#define _GLOBALMESSAGE_H_
#include <stdbool.h>
#define NameSize 20
#define ContentSize 1024
//在线用户结构体
struct ClientInfo
{
    char ClientName[NameSize];
    int sock;

};

typedef struct ClientInfo CInfo;
CInfo* CreateCInfo(const char *name,int sock);
void PrintCInfo(void *p);
bool IsClientNameEqual(void*ClientPtr,void* clientName);

enum Request
{
    LOGIN,
    CHAT
};

//信息结构体
struct GlobalMessage
{
    char FromName[NameSize];//信息来源
    char ToName[NameSize]; //信息目标
    char Content[1024]; //信息主体

    int flag ; //功能标志位
};

typedef struct GlobalMessage MSG;


#endif